package com.lengxf.design;

import java.util.ArrayList;
import java.util.List;

public class EmployeeList {

    private final List<Employee> list = new ArrayList<>();

    public void addEmployee(Employee employee) {
        list.add(employee);
    }

    public void accept(Department department) {
        list.forEach(e -> {
            e.accept(department);
        });
    }

}
